﻿import { FieldTypeEnum, ISearchField } from "@/components/searchForm";
import { markRaw } from "vue";
const searchFields: Array<ISearchField> = markRaw([
    {% for field in ModelFields %}
         {% if field.DataType == 'bit' %}
              {
                    field: "{{field.DbColumnName}}",
                    type: FieldTypeEnum.SELECT,
                    placeholder: "请选择{{field.ColumnDescription}}",
                    options: [
                        { label: "是", value: true },
                        { label: "否", value: false },
                    ],
              },

         {% elsif field.DataType == 'datetime' %}
             {
                field: "{{field.DbColumnName}}",
                type: FieldTypeEnum.DATE,
                placeholder: ['开始时间', '结束时间']
          },
        {% else %}
           { 
               field: "{{field.DbColumnName}}",
               type: FieldTypeEnum.STRING, 
               placeholder: "请输入{{field.ColumnDescription}}" 
           },
         {% endif %}
    {% endfor %}
])

export default searchFields;
